package org.shopen.puremvc.model
{
	import org.puremvc.as3.patterns.proxy.Proxy;
	import org.shopen.puremvc.model.vo.ProjectInfo;
	
	public class ProjectProxy extends Proxy
	{
		public static const NAME : String = "ProjectProxy";
		
		public static const DEFAULT_NAME : String = "New_Image";
		public static const DEFAULT_CANVAS_WIDTH : Number = 400;
		public static const DEFAULT_CANVAS_HEIGHT : Number = 300;
		public static const DEFAULT_BG_COLOR : uint = 0xFFFFFFFF;
		
		public function ProjectProxy(data:Object = null)
		{
			super(NAME, data);
		}

		override public function getProxyName():String
		{
			return NAME;
		}
		
		public function get project() : ProjectInfo
		{
			return data as ProjectInfo;
		}
		
		public function getDefaultProject() : ProjectInfo
		{
			var project : ProjectInfo = new ProjectInfo();
			project.name = DEFAULT_NAME;
			project.canvasWidth = DEFAULT_CANVAS_WIDTH;
			project.canvasHeight = DEFAULT_CANVAS_HEIGHT;
			project.bgColor = DEFAULT_BG_COLOR;
			return project;
		}
		
		public function setProject(project : ProjectInfo) : void
		{
			setData(project);
		}
		
		
	}
}